﻿using Model.BusinessModel.OutPut.sys;
using Model.DomainModel.Sys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Infrastructure.IRepository.Sys
{
    /// <summary>
    /// 菜单数据列仓储接口
    /// </summary>
    public interface ISysMenuTableColsRepository : IRepository<SysMenuTableCols>
    {
        /// <summary>
        /// 根据菜单id和字段名称获取数据列
        /// </summary>
        /// <param name="menuId">菜单id</param>
        /// <param name="fieldName">字段名称</param>
        /// <returns>返回数据列</returns>
        public SysMenuTableCols? GetTableColsByMenuIdOrFieldName(string menuId, string fieldEnName);

        /// <summary>
        /// 根据菜单id获取列
        /// </summary>
        /// <param name="menuId">菜单ID</param>
        /// <returns></returns>
        List<SysMenuTableColsOutPut> GetTableColsByMenuId(string menuId);

        /// <summary>
        /// 修改字段信息
        /// </summary>
        /// <param name="sysMenuTableCols"></param>
        public void UpdateTableCols(SysMenuTableCols sysMenuTableCols);

        /// <summary>
        /// 更新字段规则ID
        /// </summary>
        /// <param name="fieldId">字段ID</param>
        /// <param name="ruleId">规则ID</param>
        void UpdateRuleId(string fieldId, string ruleId);

        /// <summary>
        /// 根据菜单id，获取数据列
        /// </summary>
        /// <param name="menuId">菜单id</param>
        /// <returns>返回对应列集合</returns>
        public List<SysMenuTableCols> GetTableCols(string menuId);
    }
}
